<?php
/*
+--------------------------------------------------------------------------
|   CODENAME : NovaFrameWork
|   =============================================
|   by Nova
|   (c) 2005 - 2006 AutumnNetwork
|   support@netmuathu.com
|   =============================================
|   Web: http://www.netmuathu.com , http://chatxam.com/
|   Started date : 1/12/2006
+---------------------------------------------------------------------------
|   > Script written by Nova
+---------------------------------------------------------------------------
*/
class index {



    var $html       = "";
    var $template   = "";
    var $output       = "";


    	function playme()
    	{
    		global $nova, $func, $print,$DB,$skin;

			require_once ROOT_PATH."lang/en.php";

			switch( $nova->input['code'] )
			{
				case 'home':
					$this->home();
					break;	
				default:
					$this->home();
					break;
			}

			//$print->html = $skin->index();
			//$print->display();
		}





function home()
{
	global $nova, $func, $print,$DB,$skin,$sess;

		//echo $nova->location;exit;

		$data[guest_online_num] = $DB->get_num_rows($DB->query("SELECT uname FROM {$nova->vars[sql_tbl_prefix]}session WHERE guest='1'"));
		$data[member_online_num] = $DB->get_num_rows($DB->query("SELECT uname FROM {$nova->vars[sql_tbl_prefix]}session WHERE guest='0'"));
		$data[who_online_num] = $data[member_online_num] + $data[guest_online_num];
		$data[visited] = @file_get_contents("data/count.text");

		//--------User box
		if ($sess->check_user()){
		$data[userbox]= $skin->panel();	
		}
		else{
		$data[userbox]= $skin->loged(htmlentities(urldecode($_SERVER['HTTP_REFERER'])));
		} 
		/*------------------Setup for Homepage--------------*/
		$data_array = array(
		  'menu' => 	$skin->menu_home($data),
		  'contents' => 	$skin->content_mobile(),
		 );





		$this->output .= $skin->body($data_array);
        $print->add($this->output);



	 /*------------------Construct and print all--------------*/
		$homepage = array(
		  'title' => 	"{$nova->vars['site_name']}",
		  'keys' => 	"{$nova->vars['keyswords']},", 
		  'desc' => 	"{$nova->vars['home_name']},",
		  'addjs' =>  $addjs,
		  );

        $temp_all = $skin->index();

        $print->add_output($homepage,$temp_all);

    	$print->display();
}









}

?>